﻿using PetaPoco;
using System;

namespace MettingOrder.Models
{
    [TableName("Department")]
    [PrimaryKey("Id", AutoIncrement = false)]
    public class Department
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int OrderId { get; set; }
        public int ParentId { get; set; }
        [Ignore]
        public bool IsChecked { get; set; } = false;

    }

    [TableName("Employee")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class Employee
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string DepartMentId { get; set; }
        public string Avatar { get; set; }
        public string Email { get; set; }
        public string Mobile { get; set; }
        public string Position { get; set; }
        public int UserStatus { get; set; }
        public string UserId { get; set; }
        public string WeixinId { get; set; }
    }
    [TableName("Metting")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class Metting
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int ApplicantId { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public int MettingRoomId { get; set; }
        public string Pictures { get; set; }
        public string Files { get; set; }
        /// <summary>
        /// 设备集合
        /// </summary>
        public string Equipments { get; set; }
        public int mettinglevel { get; set; }
        public string remark { get; set; }
        public bool isUseVideo { get; set; } = false;
        public bool isOrderFood { get; set; } = false;
        public bool isUseParking { get; set; } = false;
    }

    [TableName("Metting_Employee")]
    [PrimaryKey(null, AutoIncrement = false)]
    public class Metting_Employee
    {
        public int MettingId { get; set; }
        public int EmployeeId { get; set; }
        public int PositionId { get; set; }
    }

    [TableName("MettingRoom")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class MettingRoom
    {
        public int Id { get; set; }
        public string Address { get; set; }
        public int DepartMentId { get; set; }
        public bool IsBig { get; set; }
        [ResultColumn]
        public DateTime StartDate { get; set; }
        [ResultColumn]
        public DateTime EndDate { get; set; }
        [ResultColumn]
        public string MettingName { get; set; }
    }

    [TableName("MettingRoom_Position")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class MettingRoom_Position
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int MettingRoomId { get; set; }
    }

    [TableName("Equipment")]
    [PrimaryKey("id", AutoIncrement = true)]
    public class Equipment
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }

    [TableName("MettingRoom_Department")]
    [PrimaryKey(null, AutoIncrement = false)]
    public class MettingRoom_Department
    {
        public int MettingRoomId { get; set; }
        public int DepartMentId { get; set; }
    }
}